package com.baitiaojun.biz.controller;

import com.baitiaojun.common.domain.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

import static com.baitiaojun.common.domain.model.result.CommonResult.ok;

@Api("测试类")
@RestController
@RequestMapping("/")
public class TestController {

    @ApiOperation("测试接口")
    @PostMapping("/test")
    public CommonResult get(@RequestBody Dto dto, HttpServletRequest request) throws IOException {

        //        throw GlobalExceptionHelper.builder().exception(new ErrorCode());
        return ok();
    }
}
